#include <stdio.h>

using namespace std;

#define MAXN 50
int numbers[MAXN][MAXN];

void FillNumbers(int n) {
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= i; ++j) {
      int x;
      if (i == 0 || j == 0 || j == i) {
        x = 1;
      } else {
        x = numbers[i - 1][j] + numbers[i - 1][j - 1];
      }
      numbers[i][j] = x;
      printf("%d%s", x, j == i ? "\n" : " ");
    }
  }
}

int main() {
    int n;
    scanf("%d", &n);
    FillNumbers(n);
//   FillNumbers(4);
  return 0;
}